Title says it all please make sure you submit code in C only =) already tried using name char [30] but cant mix it with else/if condititons. Thank You iC.
Title says it all please make sure you submit code in C only =) already tried using name char [30] but cant mix it with else/if condititons. Thank You iC.
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 22:43
I am developing an eclipse plugin with a simple tree view.
I have the problem that in some distributions of eclipse (Luna, Kepler, Mars) the special characters (äöü) in the tree entries are not shown correctly. Just some cryptic letters appear. Strange thing is, that in my installation (mars2) everything is displayed correct. After comparing lots of settings in the different distributione I could not figure out what setting or plug in is influencing this behaviour.
Any hint that brings me further to a solution is appreaciated. Thanks!
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 22:43
I have a case class like this:
case class Test(i: Int, t: Option[Test])
I would now like to reduce this case class and add all the i's. So for example., if I have an input like this
val x = Test(1, Some(Test(2, Some(Test(3,None)))))
I expect the result to be 6 and here is what I have tried so far:
def all(acc: Int, test: Test): Int = {
if (test.t.isDefined)
all(acc, test.t.get)
else
test.i
}
This gives me 3 and I see that I'm missing a minor detail somewhere in the recursion and I'm not able to see where! Any clues?
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 22:43
I am attempting to compile two files in two child process I create from Node.js' child_process module with .spawn() in parallel, basically looping over sources and spawning two shells immediately.
However only one file will be compiled and it's not always the same. One child_process will retu with error code 2.
Is cl.exe to be known to not being able to run two instances? I am assuming that ruing it sequentially will fix this problem.
Note: setting or unsetting /MP flag doesn't change this behaviour.
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 21:42
I have a Xamarin.Forms project where I am using Xlabs to implement checkboxes. I can get them to appear which is great. I want to be able to do this:
void OnSelection(object sender, SelectedItemChangedEventArgs e)
{
if (e.SelectedItem == null)
retu;
var selectedStudent = ((ListView)sender).SelectedItem as Student;
// set time of student checkin
}
But with my check boxes. I want to be able to handle checkbox selection as it happens. From what I've seen online I can set a new boolean property of my student object selected, but that simply doesn't work with my project. Here is my current approach:
void OnSelection(object sender, EventArgs e)
{
CheckBox isCheckedOrNot = (CheckBox)sender;
var name = isCheckedOrNot.DefaultText;
//not sure what to do here?
var student = ((CheckBox)sender)...
// set time of student checkin
}
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 21:42
I have a canvas graph that I have wrapped in a Vue component. Now I want to make it responsive, but adding canvas { width: 100%; } makes it look really pixelated. So how do I do proper dynamic resizing? CSS or Javascript, either is fine.
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 21:42
I'm having very different behaviors with nested contenteditable="false" elements within a parent contenteditable="true:
<pre>
<div contenteditable="true">
<span>I'm supposed to be editable</span>
<p contenteditable="false">I'm NOT supposed to be editable.<br>Neither should I.</p>
<span contenteditable="false">I'm NOT supposed to be editable.</span>
</div>
</pre>
This fiddle exemplifies how two elements that should not be editable are in fact editable with Inteet Explorer 11 but not Google Chrome. What gives?
I have seen some people applying a strange workaround by setting them to "true", which indeed works for IE, but has the opposite effect on Google Chrome (as it should).
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 20:41
Blockquote
I have purchased several licenses back in December 2013. Now, I have upgraded the ImageResizer and need to generate a key that I can use in my web.config. Previously I was using drm files and everything worked as it should. How do I generate this key or is there any alteative?
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 20:41
So I was trying to convert pixel to spatial coordinates when i found the package image_geometry. So i decided i would try to use it, i initialized it, and called the desired function, taken fro the API. Here's what i did
import image_geometry
from image_geometry import PinholeCameraModel
self.img_geo = PinholeCameraModel()
(r_x,r_y,r_z) = self.img_geo.projectPixelTo3dRay((359,285))
print(r_x)
Obviously the self.img_geo is in my init function and then later on i use the projection function, and then get that error. Any ideas whats wrong?
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 20:41
Severity Code Description Project File Line Suppression State Detail Description Waing IDE0006 Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled. HelloWorld 1 Active To see what caused the issue, please try below.
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 19:39
I have an entity which has some number of associated entities that I must show to the user in row form each, with other data such as the associated entity's name, cost, etc. I need the user to be able to modify the quantity.
I'm displaying the table in twig, and have a FormType that shows its associated entities in a CollectionType, but caot for the life of me figure out how to do something like this:
{{ form_row(form.child[ entity.getId ]) }}
So that the quantity edit forms can appear in their corresponding table cell and not just sit on the top of the page. Should I render the entire table using a form? In that case, I have the difficulty of then integrating additional forms e.g. delete, and also I have just read that this is discouraged.
At the same time, Twig has next to no array support, so my other solution, which would be to store each associated form in an array indexed by ID, can't be made to work either.
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 19:39
I am using LinkIt Smart 7688 - an OpenWRT device for IoT. It supports station mode WiFi i.e. it can coect to another WiFi AP and one can use inteet. I am trying to retrieve a list of mobile phones that are coected to the wireless lan. I am trying to list all the clients but my Android phone is not showing up.
I used nmap with the command
nmap -sP 192.168.0.1-254
and i get this
Starting Nmap 6.47 ( http://nmap.org ) at 2016-06-20 17:44 IST
Nmap scan report for 192.168.0.1
Host is up (0.0049s latency).
MAC Address: F0:7D:68:B8:BB:D0 (D-Link)
Nmap scan report for 192.168.0.6
Host is up (0.0038s latency).
MAC Address: 6C:62:6D:4E:87:28 (Micro-Star INT'L CO.)
Nmap scan report for 192.168.0.12
Host is up (-0.089s latency).
MAC Address: FC:AA:14:B8:12:91 (Giga-byte Technology Co.)
Nmap scan report for 192.168.0.111
Host is up (-0.095s latency).
MAC Address: 40:8D:5C:49:FA:24 (Unknown)
Is the problem related to my phone or are there other tools to do this?
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 19:39
I already looked into several example on how to remove the key "data" in response, but i caot fix it.
I tried to use the callback provided by dingo
retu $this->collection($users, new UserTransformer, function ($resource, $fractal) {
$fractal->setSerializer(new ArraySerializer);
});
In change the "$fractal->setSerializer(new CustomSerializer);" to "$fractal->setSerializer(new ArraySerializer);" since I dont have CustomSerializer(And how to make this custom serializer?) based on the fractal documentation array serializer but the out put has the key "data".
I also tested the fractal library in different project and implementing the ArraySerializer as the Serializer, and it works.
What am I missing in the setup of dingo-fractal?
Thanks.
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 18:11
I'm making a website using Google Maps API v3. Markers are added into the map with attributes being taken from marker data
Marker Data set
var markerData = [
"lat": '21.0236081',
"long": '105.789596',
"icon": 'http://i.imgur.com/0Js6A7w.gif',
"description": 'blah blah'
];
Pin marker onto map
for (var i = 0; i < markerData.length; i++) {
var data = markerData[i];
var myLatLng = new google.maps.LatLng(data.lat, data.long);
var image = "'" + data.icon + "'";
var marker = new google.maps.Marker({
position: myLatLng,
icon: image
});
(function (marker, data) {
google.maps.event.addListener(marker, "click", function (e) {
infoWindow.setContent(data.description);
infoWindow.open(map, marker);
});
})(marker, data);
markerList.push(marker);
}
I couldn't get the link to put into 'icon' attributes of my markers. Can someone give me some advice?
Thank you all!!
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 18:11
I am trying to export function within route file. Here is my code in user.js
var express = require('express');
var router = express.Router();
router.post("/test", function (req, res, next) {
res.send("success");
});
var funDef=function(){
console.log("export a function")
}
moudle.exports=router;
How can I export or call funDef in another js file. I tried the following way but it is not working
var readFun= require("./user.js");
readFun.funDef();
Can anyone guide me?
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 18:11
I have a compiled-to-rpm opscenter package that dumps the files to /opt/mypckage
everything is okay when I execute /opt/mypackage/opscenter/bin/opscenter -f it will tu up the opscenter web which includes http.log on the log directory
I have created a start-script which is tested from tarball
#!/bin/sh
echo "exec 'sudo /etc/init.d/opscenterd start'"
exec sudo /etc/init.d/opscenterd start
wierd thing is- yes it will start the opscenter service using the script above but the url is not ruing using port 8888 and no http.log generated. is there any way I can tweak this on?
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 16:44
I am currently leaing Javascript and I am at the most basic level someone could be.
I wrote a simple script for generating a referral link for envato market.
Its a very simple function which gets the profile url and useame and a onclick is used to combine these variables and put the ?ref= in there.
<!DOCTYPE HTML>
<html>
<head>
<title>JS</title>
</head>
<body>
<script>
function refferalGen() {
var userName = document.getElementById("useame").value;
var profUrl = document.getElementById("profurl").value;
var result = (profUrl) + "?ref=" + (userName);
document.getElementById("resulttxt").value = result;
}
</script>
<input style="width:250px" type="text" id="useame" placeholder="Useame" /><br>
<input style="width:250px" type="text" id="profurl" placeholder="Profile Url" /><br>
<input style="width:250px" type="text" id="resulttxt" placeholder="Result Will be printed here" /><br>
<input style="width:250px" type="button" name="clickbait" onclick="refferalGen()" value="Clickbait !" />
</body>
</html>
I want it to be so that I dont have to use the button to get the result Instead it is real-time.
When i type in the useame textfield it automatically updates the result field instantly and same goes for the profile url field.
Thanks to anyone who replies.
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 16:44
Simple question, probably been asked a million times but I've searched and am no closer to getting this to work.
I have a PHP script within the UserFrosting framework that serves a file to the user via their browser. I would like the file to open in their browser if they select 'Open' insteand of download.
Problem is, the only things that are opening properly are text files. Anything else (PDFs and JPGs tested so far) are just opening as a page of ASCII/garbled code instead of being interpreted as a PDF or an image.
Here's the code I'm using:
header('Content-Type: '. $mime);
header('Content-Length: ' . filesize($diskname));
header('Content-Disposition: inline; filename=' . $savename);
retu readfile($diskname);
$mime is the Mime type of the file set via a function, so could be application/pdf or image/jpeg for the files I'm trying to view so far.
Does anyone have any ideas why the files aren't opening properly?
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 16:44
Is there any way to boost them up? it is really aoying.
I used "transform: translateZ(0);" for chrome and firefox but it doesn't seem to work on safari.
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 15:41
This is my PHP-Code:
<?php
include("dbcoect.php");
$abfrage = "SELECT Name, Adresse, Telefon, Nr FROM tbl_test1 WHERE 1"; $ergebnis = mysqli_query($db, $abfrage);
?> I want to show the Value of $ergebnis but it says that it could not be converted to sting. Iam a totaly begier in PHP so please help me...
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 15:41
Im trying to have a formualr which has 3 sites (divs). the first one has only a next button, the second has a back and a next button, the last has a back and a submit button.
if Im using this code:
$('.next').click(function(){
$(this).parent().hide().next().show();//hide parent and show next
});
$('.back').click(function(){
$(this).parent().hide().prev().show();//hide parent and show previous
});
the second page just appears for a few milliseconds and then goes back to the first one.. is it deprecated?
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 15:41
I would like to make line chart in my project. i was already make pie chart using datavisulazation dll but now want to make line chart with dynamic data so how can i make it?
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 14:37
We are developing eCommerce website from scratch just like amazon.com, ebay.com, flipkart.com. We need very fast searching so we chosen Mongodb as a backend. Now we want to know which is the best architecture to follow? I have read about N-tire architecture and Onion architecture, but very confused here to find which is best for us.
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 14:36
my xml file contains:
<studentform>
<student Studentname=" " Address=" " SSC_marks=" " Inter_marks=" " Btech_marks=" " Mailid=" "/>
<student Studentname=" " Address=" " SSC_marks=" " Inter_marks=" " Btech_marks=" " Mailid=" "/>
<student Studentname=" " Address=" " SSC_marks=" " Inter_marks=" " Btech_marks=" " Mailid=" "/>
</studentform>
iam trying to read and write this xml file in the same file, but in the output the attributes position is shuffled like this
<studentform>
<student Mailid=" " SSC_marks=" " Btech_marks=" " Studentname=" " Address=" " Inter_marks=" "/>
<student Mailid=" " SSC_marks=" " Btech_marks=" " Studentname=" " Address=" " Inter_marks=" "/>
<student Mailid=" " SSC_marks=" " Btech_marks=" " Studentname=" " Address=" " Inter_marks=" "/>
</studentform>
it is kind of a weird problem. Any help is appreciated.
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 14:36
I am very new to what i am currently working now. I may not be explain well but as much i have understood i would like to put my understanding on the same.
I am using the Owin token based authentication for web api, for login i am calling the token method which retus the access token. I would like to know how to secure our web api, so that without the access token it should allow to call the web api method. I am using the angular js resource, i believe we need to define the header in angularjs service part, but where and exactly i do not have any idea, can anyone please help me on this.
Example:-
This my service written in angularjs,
sghServices.factory('GlobalSettingsService', function ($resource) {
retu $resource("../Api/eClaim/SecondGlobalSettings",
{},
{
post: {
method: 'POST', isArray: false,
headers: { 'Content-Type': 'application/json' }
},
update: {
method: 'PUT'
}
});
});
This is web api method
[Authorize]
[Route("~/Api/eClaim/GlobalSettings")]
[HttpGet]
public ReportAndeCliam GetGlobalSettings()
{
//Code Wriiten here
}
As of now i am able to access the web api without access token, i waa design in such a way if token is not available it should not allow to use the [Authorized] web api method.
Thanks in Advance :)
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 11:35
My question is about performance only, not semantics.
Does adding a new column to a df cause the data in the existing DataFrame to be physically copied to a new memory location (to ensure that the DataFrame occupies contiguous memory, for example)?
# using pandas 0.18.1, python 3.5
import pandas as pd
df = pd.DataFrame({'a': range(100)})
b = pd.Series(range(100))
df['b'] = b # is this operation expensive?
# equivalently df.loc[:, 'b'] = b
I know (from experimentation, couldn't find it in the documentation) that df['b'] = b will semantically create a copy of b, which obviously requires copying of underlying data. But I have no idea if the data in the other columns can stay where it was, or need to be moved sometimes.
I also know that adding a large number of columns is expensive. I'm only asking about adding a single column.
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 11:35
ListAdapter adapter = new SimpleAdapter(Search.this, selected,R.layout.displays_searchitems, new String[]{"EAN","COMPANY", "NAME","DESCRIPTION", "BRAND", "CBRAND"}, new int[]{
R.id.ets_ean, R.id.ets_company, R.id.ets_name, R.id.ets_desc, R.id.ets_brand, R.id.ets_cbrands});
customList.setAdapter(adapter);
So this my adapter. Search is the name of my class. its_ean,its_comapny.... are all the id of the editText that i'm displaying the data into from the database. The problem is, each time i search for new result it's displaying one below the other than auto-refreshing. notifyDataSetChanged() is not working.
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 11:35
Where is the documentation for functions, symbols under Core.Std ?
Or, is there any conventional way to look up ocaml documentation rather than guessing in utop REPL ?
Thanks
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 10:21
i would like to minimise my if and else what would you guys recommend?
im using laravel 5.1 framework if that helps :)
im trying to let users log in with multiple columns (e.g id,email,phone) if one fails then checks the next columns one or is there better way of doing it?
code:
$email = $request->only('email', 'password');
$ssn='';$badgenumber='';$ophone='';$fphone='';$pager='';
if(preg_match("/^[0-9]+$/",$email['email']) == 1 && strlen($email['email']) < 6){
$ssn = $request->only('ssn', 'password');
$badgenumber = $request->only('badgenumber', 'password');
}
if(preg_match("/^[0-9]+$/",$email['email']) == 1 && strlen($email['email']) > 6){
$ophone = $request->only('ophone', 'password');
$fphone = $request->only('fphone', 'password');
$pager = $request->only('pager', 'password');
}
if(filter_var($email['email'],FILTER_VALIDATE_EMAIL) === false)
$email ='';
$error = 1;
try {
// verify the $email and create a token for the user
if ($error == 1 && $email) {
$error = 0;
if (!$token = JWTAuth::attempt($email)) {
$error = 1;
}
}
if ($error == 1 && $ssn) {
$error = 0;
if (!$token = JWTAuth::attempt($ssn)) {
$error = 1;
}
}
if ($error == 1 && $badgenumber) {
$error = 0;
if (!$token = JWTAuth::attempt($badgenumber)) {
$error = 1;
}
}
if ($error == 1 && $ophone) {
$error = 0;
if (!$token = JWTAuth::attempt($ophone)) {
$error = 1;
}
}
if ($error == 1 && $fphone) {
$error = 0;
if (!$token = JWTAuth::attempt($fphone)) {
$error = 1;
}
}
if ($error == 1 && $pager) {
$error = 0;
if (!$token = JWTAuth::attempt($pager)) {
$error = 1;
}
}
if($error == 1){
retu response()->json(['error' => 'invalid_credentials'], 401);
}
} catch (JWTException $e) {
// something went wrong
retu response()->json(['error' => 'could_not_create_token'], 500);
}
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 10:21
I'm writing a program in NetBeans that allows the user to choose some computing equipment, hours to rent that equipment, and some other options. The program takes that input and calculates a price for the rental, which it displays in a text pane. At the moment, I've just got the text pane displaying the hours input, which is parsed using a Netbeans jTextFieldKeyPressed event. This seems to be working correctly, but the output is being displayed one keypress after what is being shown.
For example, if I enter "1" the output doesn't change. If I then enter something else, like "2", " ", or any other character, the output will update to show the "1" that I previously entered. How can I make the form update in real time?
برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 10:21